﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="product.aspx.cs" Inherits="product" %>
<%@ Register TagPrefix="common" TagName="header" Src="~/header.ascx" %>
<%@ Register TagPrefix="common" TagName="footer" Src="~/footer.ascx" %>
<%@ Register TagPrefix="common" TagName="secondcontact" Src="~/secondpagecontact.ascx" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>产品中心 - 超敏仪器</title>
    <link href="assets/css/global.css" rel="stylesheet" />
    <script type="text/javascript" src="/assets/javascript/jquery-1.5.1.min.js"></script>

    <script type="text/javascript">
        var currentCatid = $("#currentCatid");
        var dd = $("#subcategoryWrap");
        $(document).ready(function () {
            $("#currentCatid").click(function () {
                $("#subcategoryWrap").toggle();
            });

        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <common:header runat="server"></common:header>
        <div class="commonWrap">
            <a href ="#" class="subBanner">
                <img src="/assets/images/sub-banner.jpg" />
            </a>
            <div class="subSideBar">
                <ul>
                    <li class="title">产品分类</li>
                    <% for (int i = 0; i < productCategory.Rows.Count; i++)
                       { %>
                    <li><a href="/product.aspx?type=<%=productCategory.Rows[i]["id"] %>"><%=productCategory.Rows[i]["name"] %></a>
                        <% if (hArray[i] != null && (hArray[i].Rows.Count != 0))
                           { %>
                        <ul>
                             <% foreach(DataRow de in hArray[i].Rows){ %>
		                    <li class="page_item"><a href="/product.aspx?type=<%=productCategory.Rows[i]["id"] %>&catid=<%=de["id"] %>" ><%=de["name"] %></a></li> 
                            <% } %>
                        </ul>
                        <% } %>
                    </li>
                    <% } %>
                </ul>
                <common:secondcontact ID="secondcontact" runat="server"></common:secondcontact>
            </div>
            <div class="subContent">
                <div class="pathleaf">
                    <span style="background:url('/assets/images/place.jpg') no-repeat 14px 8px; width:35px;height:39px;display:inline-block;float:left;"></span>
                    <a href="/">首页</a> &gt; <a href="product.aspx">产品中心</a>
                    <% if( subCategory !=null ){ %>
                    <span class="box_r pd_center_subcategory"><span id="currentCatid" style="width:100%;display:block;cursor:pointer;">选择子分类▼</span>
                        <div class="pd_center_subcategory_wrap" id="subcategoryWrap">
                            <i style="position:absolute;color:#fff;left:65px;top:-10px;">▲</i>
                            <ul>
                                <% foreach ( DataRow row in subCategory.Rows ){ %>
                                <li><a href="/product.aspx?type=<%=currentType %>&catid=<%=row["id"] %>" title="<%=row["name"] %>"><%=row["name"] %></a></li>
                                <% } %>
                            </ul>
                        </div>
                    </span>
                    <% } %>
                </div>
                <div class="" style="width:760px;">
                    <div style="width:742px;margin:0px auto;">
                        <div style="width:780px;">
                            <% if(products != null){ %>
                    <% for (int j = 0; j < products.Rows.Count; j++)
                       { %>
                    <div class="productCenter" style="height:238px;border:solid 1px #dcdcdc;width:238px;margin:13px 10px 0px 0px;float:left;">
                        <a href="/product_detail.aspx?id=<%=products.Rows[j]["id"].ToString().Trim() %>">
                            <img src="<%=products.Rows[j]["img"].ToString().Trim() %>"  />
                        </a>
                        <p style="overflow:hidden;" title="<%=products.Rows[j]["name"].ToString().Trim() %>">名称：<%=products.Rows[j]["name"].ToString().Trim() %></p>
                        <p class="models">型号：<%=products.Rows[j]["model"].ToString().Trim() %></p>
                    </div>
                    <% } }%>
                    </div>
                        </div>
                    <div class="clear"></div>
                </div>
                <div class="clear" style="height:20px;"></div>
                <div class="pagestring">
                    <a href="/product.aspx">首页</a>
                    <a href="/product.aspx?page=1" class="current">1</a>
                    <a href="/product.aspx?page=1">末页</a>
                    <a href="/product.aspx">共1页</a>
                </div>         
            </div>

    </div>
        <div class="clear"></div>
        <common:footer runat="server"></common:footer>
    </form>

</body>
</html>
